import Taro, { Component, request,redirectTo, navigateTo } from '@tarojs/taro'
import { View, Button, Text, Image, Input, Textarea } from '@tarojs/components'
import { imgUrl } from '../../config'
import './cyht.scss'


class Cyht extends Component {

//   config = {
//     navigationBarTitleText: '首页'
//   }
  constructor (props) {
    super(props)
    this.state = { 
        value:"<"
     }
  }
  close(){
    redirectTo({
        url: '/pages/photo/photo'
      })
 }
 chooseAdress(){
    redirectTo({
        url: '/pages/chooseAdress/chooseAdress'
    })
 }
 chooseQz(){
    redirectTo({
        url: '/pages/chooseQz/chooseQz'
    })
 }
 chooseHt(){
    redirectTo({
        url: '/pages/chooseHt/chooseHt'
    })
 }
  render () {
    return (
      <View className='index'>
        <View className='head'>
            <Text className='close' onClick={this.close}>{this.state.value}</Text>
            <Text className='name'>参与话题</Text>
            <Text className='file'>发布</Text>
        </View>
        <View className='cont'>
            <View className='qz' onClick={this.chooseQz}>
                <Image src={`${imgUrl}/qz.png`} />
                <Text>选择圈子</Text>
            </View>
            <View className='line'></View>
            <View className='qz' onClick={this.chooseHt}>
                <Image src={`${imgUrl}/ht.png`} />
                <Text>选择话题</Text>
            </View>
        </View>
        <View className='fb'>
            <Input placeholder='请输入标题(5-33个字)' className='tit' placeholderClass='ph' type='text' />
            <View className='line'></View>
            <Textarea placeholder='请输入内容(5-200个字)' className='nr' placeholderClass='ph' type='text'></Textarea>
            <View className='fm'>
                <View className='fmCont'>
                    <Image src={`${imgUrl}/fm.png`} className='fmPic' />
                    <Image src={`${imgUrl}/xgfm.png`} className='xgfm' />
                </View>
            </View>
            <View className='picCont'>
                <Image src={`${imgUrl}/htPic.png`} className='pic1' />
                <Image src={`${imgUrl}/close.png`} className='closePic' />
                <Input value='2018年9月10号科赛上市' className='zs' type='text' />
            </View>
            <View className='picCont'>
                <Image src={`${imgUrl}/htPic2.png`} className='pic1' />
                <Image src={`${imgUrl}/close.png`} className='closePic' />
                <Input placeholder='添加注释...' placeholderClass='tjzs'  className='zs' type='text' />
            </View>
            <View className='picCont'>
                <Image src={`${imgUrl}/htPic3.png`} className='pic1' />
                <Image src={`${imgUrl}/close.png`} className='closePic' />
                <Input placeholder='添加注释...' placeholderClass='tjzs'  className='zs' type='text' />
            </View>
            <View className='foot'>
                <View className='chooseAdress' onClick={this.chooseAdress}>
                    <Image src={`${imgUrl}/adress.png`} className='adress' />
                    <Text className='myAdress'>所在位置</Text>
                </View>
                <Image src={`${imgUrl}/photo.png`} className='photo' onClick={this.close} />
            </View>
        </View>
      </View>
    )
  }
}

